<div class="modal-header" id="scope">
	<h3 class="modal-title" ng-if="param.type == 'insert'">新增</h3>
	<h3 class="modal-title" ng-if="param.type == 'update'">修改</h3>
</div>
<div class="modal-body">
	<form name="myForm" class="form-horizontal form-validation">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>用户名：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="用户名" ng-model="param.data.username" ng-readonly="param.type=='update'"
						ng-pattern=" /^[A-Za-z0-9]+$/" ng-minlength="6"  ng-maxlength="22"  required/>
					</div>
					<p>必须以字母开头，可以和数字组合，长度在6-22位之间。例：a123456</p>
				</div>
             <div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>密码：</label>
					<div class="col-sm-5">
						<input type="password" class="form-control" placeholder="密码" ng-model="password"/>
					</div>
					<p>字母或数字任意组合，长度在6-22位之间。例：123456a</p>
				</div>
             <div class="form-group" ng-show="qr">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>确认密码：</label>
					<div class="col-sm-5">
						<input type="password" class="form-control" placeholder="确认密码" ng-model="newpassword" />
					</div>
					<p>两次输入的密码必须一致。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>姓名：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="姓名" ng-model="param.data.name"  ng-maxlength="100"  required>
					</div>
					<p>必填</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>手机：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="手机" ng-model="param.data.phone"  ng-maxlength="11"  ng-pattern="/^[]|(1[3|4|5|7|8][0-9]\d{8})$/" required/>
					</div>
					<p>11位手机号，唯一不可重复。</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>邮箱：</label>
					<div class="col-sm-5">
						<input type="email" class="form-control" placeholder="邮箱" ng-model="param.data.email"  ng-maxlength="100" required>
					</div>
					<p>必填，请注意邮箱格式。例：123456@qq.com</p>
				</div>
			    <div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>工号：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="工号" ng-model="param.data.empno"  ng-maxlength="100"  required>
					</div>
					<p>必填</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>部门：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="部门" ng-model="param.data.department"  ng-maxlength="100"  required>
					</div>
					<p>必填</p>
				</div>
				<div class="form-group">
				<label class="col-sm-3 control-label"><span style="color: red; text-align: center;" >* &nbsp</span>职务：</label>
					<div class="col-sm-5">
						<input type="text" class="form-control" placeholder="职务" ng-model="param.data.position"  ng-maxlength="100"  required>
					</div>
					<p>必填</p>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">
						<span style="color: red; text-align: center;">* &nbsp</span>是否激活：
					</label>
					<div class="col-sm-4">
						<label class="i-switch m-t-xs m-r bg-info">
							<input type="checkbox" name="enabled" ng-model="enabled" ng-checked="param.data.status > 0">
							<i></i>
						</label>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-3 control-label">代售点绑定：</label>
					<div class="col-sm-5">
						<ui-select ng-model="agencyList.selected" theme="bootstrap">
						<ui-select-match placeholder="代售点">{{$select.selected.name}}</ui-select-match>
						<ui-select-choices
							repeat="agency in agencyList | propsFilter:{name: $select.search}">
						<span ng-bind-html="agency.name | highlight: $select.search"></span>
						</ui-select-choices> </ui-select>
					</div>
                    <p>选择与帐号绑定的代售点，提交成功后该帐号即为代售点帐号，用来查询该代售点的业务。</p>
				</div>
			</div>
			<footer class="panel-footer text-right bg-light lter">
				<button class="btn btn-default" type="button" ng-click="cancel()">取消</button>
				<button type="submit" class="btn btn-success" ng-click="ok()">提交</button>
			</footer>
		</div>
	</form>
</div>